# coding:utf-8
"""# 
# 
# 
# 
"""

def hist_statistic(value):
    pass

def statistic(key,value):
    """
    """
    result = {}
    for (p, q) in zip(key, value):
        if result.get(p):
            result[p] += 1
        else:
            result[p] = 1
    return result


def filename_creator(p, q, size):
    """
    """
    
    template = "VLogicStream_p=%s_q=%s_size=%s" % (p, q, size)
    return template

def xor(char1,char2):
    if char1 == char2:
        return '0'
    else:
        return '1'

def right_shift(array, offset):
    """
        循环向右移位
    """
    str_len = len(array)
    return array[-offset:] + array[:-offset]



def left_shift():
    """
        循环左移
    """
    pass

def string_xor(str1,str2):
    """
        两个序列抑或操作
    """
    result = ""
    for (char1, char2) in zip(str1,str2):
        result += xor(char1,char2)
    return result


def four_tuples_stastic(string1, string2):
    """
        两个等长序列，项一一对于，统计四元组信息
        top,botoom,top,minus
    """
    (top,bottom,add,minus) = (0,0,0,0)
    for x,y in zip(strbufferA,strbufferB):
        temp = x+y
        if temp == "00":
            bottom += 1
        elif temp == "11":
            top += 1
        elif temp == "01":
            add += 1
        elif temp=="10":
            minus +=1
    
    return (top,bottom,add,minus)


def create_seed():
    """
        生成种子
    """

    pass


